package com.zcp.mvpdemo.presenter;

import com.zcp.mvpdemo.interfaces.LoginInterface;

/**
 * Created by Administrator on 2017/3/28.
 */

public class LoginPresenter extends BasePresenter<LoginInterface> {
    public void getData(String name, String pwd) {
        if (name == null || pwd == null) {
            getBaseInterface().nameFail();
        } else if (name.equals("zcp") && pwd.equals("123")) {
            getBaseInterface().nameSuccess();
        } else if (!name.equals("zcp") || !pwd.equals("123")) {
            getBaseInterface().nameFail();
        }
    }
}
